/**
 * @summary 学科模块
 * @description
 *   8.16 新增学科数据
 */


 import * as createAPI from '@/api/hmmm/subjects'

 export default {
   namespaced: true,
   state: {
     // 学科列表
     subjectsList: [],
     simpleList: {},
   },
   mutations: {
     SET_SUBJECTS_LIST(state, newValue) {
       state.subjectsList = newValue;
     },
     SET_SIMPLE_LIST(state, newValue) {
       state.simpleList = newValue;
     },
   },
   actions: {
     async getSubjectsList({ commit }, params) {
       const res = await createAPI.list(params);
       commit('SET_SUBJECTS_LIST', res);
     },
     async getSimpleList({ commit }, params) {
       const res = await createAPI.simple(params);
       commit('SET_SIMPLE_LIST', res);
     },
   },
 };
